<template>
  <view class="containter">
    <uv-navbar bgColor="#104682" title="详情" :titleStyle="{'color':'#fff'}" leftIconColor="#fff" autoBack placeholder>
    </uv-navbar>
    <view class="header">
      <view class="title">
        {{ detailInfo.title }}
      </view>
      <view class="time">
        {{ detailInfo.create_time }}
      </view>
    </view>
    <view class="richTxt">
      <uv-parse :content="detailInfo.content"></uv-parse>
    </view>
  </view>
</template>

<script>
  import reqApi from "../../api/api.js";
  export default {
    data() {
      return {
        detailInfo: {},
        params: {
          id: "",
          type: ""
        },
      }
    },
    onLoad(option) {
      this.params.id = option.id;
      this.params.type = option.type;
      this.getDetail();
    },
    methods: {
      getDetail() {
        reqApi.basicDetail(this.params).then(res => {
          console.log("详情", res);
          this.detailInfo = res.data;
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .containter {
    padding: 0 40rpx;
    box-sizing: border-box;
    width: 100vw;
    min-height: 100vh;
    background: #fff;

    .header {
      padding: 30rpx 0;
      box-sizing: border-box;
      border-bottom: 2rpx solid #eee;

      .title {
        font-weight: bold;
        font-size: 32rpx;
        color: #333333;
        margin-bottom: 10rpx;
      }

      .time {
        font-weight: 400;
        font-size: 24rpx;
        color: #CCCCCC;
      }
    }

    .richTxt {}
  }
</style>